home *** CD-ROM | disk | FTP | other *** search
- //************************************************************************
- //
- // Module: powertcp.h
- //
- // Purpose:
- // PowerTCP header file defines C access function for all PowerTCP DLLs
- //
- //************************************************************************
- //
- // Written by Dart Communication Application Programming Group.
- // Copyright (c) 1994 Dart Communications. All Rights Reserved.
- //
- //************************************************************************
-
- /*
- PT_EXCEPTION enummerates all possible error conditions for any channel
- */
-
- typedef enum
- {
- PT_OK=0, /* OK...ErrorDesc can be advisory or NULL */
- PT_HARDWARE=1, /* hardware failure */
- PT_PROTOCOL=2, /* protocol software failure */
- PT_BADNAME=3, /* name of host cannot be resolved to address */
- PT_CONNREFUSED=4, /* connection to host refused - remote host is not listening */
- PT_NOROUTE=5, /* no route to host (check network part of address) */
- PT_NOHOST=6, /* remote host is not available (check host part of address) */
- PT_NOMEM=7, /* insufficient resources to accept buffer or create channel */
- PT_ADDRINUSE=8, /* address/port in use */
- PT_NOTCONNECTED=9, /* attempt made to use a session that is not PT_CONNECTED */
- PT_NORESOURCE=10, /* insufficient resources on host */
- PT_NOTACCEPTED=11, /* applicaton did not properly accept passive connection */
- PT_SOFTWARE=12, /* general software error */
- PT_REMOTECLOSE=13, /* remote host reset or closed connection */
- PT_WARNING=14, /* general warning */
- PT_ERROR=15, /* general error */
- PT_LAST=16 /* placeholder */
- } PT_EXCEPTION;
-
- /*
- PT_PROTOCOL enumerates the PowerTCP protocol types
- */
-
- typedef enum
- {
- PT_NULL=0, /* NULL Protocol */
- PT_TCP=1, /* Transmission Control Protocol */
- PT_TNT=2, /* TELNET */
- PT_FTP=3, /* File Transfer Protocol */
- PT_UDP=4, /* user datagram protocol */
- PT_VT=5, /* VT emulator */
- PT_SNMP=6, /* Simple Network Management Protocol */
- PT_SMTP=7 /* (SMT) Simple Mail Transfer Protocol */
- } PT_TYPE;
-
- /*
- PT_STATE enumerates possible states for any session...
- */
-
- typedef enum
- {
- PT_INVALID=0, /* invalid or error */
- PT_CLOSED=1, /* closed session (steady state) */
- PT_CONNECTING=2, /* in process of initializing session (transition state) */
- PT_CONNECTED=4, /* session is operating (steady state) */
- PT_LISTENING=8, /* session is listening for a connection (steady state) */
- PT_CLOSING=16 /* in process of closing session (transition state) */
- } PT_STATE;
-
- /*
- PT_FLAGS enumerates possible socket options and flags supported by PowerTCP
- */
-
- typedef enum
- {
- PT_NOFLAGS=0, /* use this to specify no flags */
- PT_DEBUG=1, /* enable all debugging features for session */
- PT_REUSEADDR=2, /* allow the socket to be bound to an address in use */
- PT_KEEPALIVE=4, /* send keepalives (TCP only) */
- PT_SHOW=8, /* show each listener and connection as an icon */
- PT_TCPNODELAY=16 /* enables TCP_NODELAY socket option */
- } PT_FLAGS;
-
- /*
- FTP_FILE_STRUCT enumerates possible file structures
- */
-
- typedef enum
- {
- FTP_FILE,
- FTP_RECORD,
- FTP_PAGE
- } FTP_FILE_STRUCT;
-
- /*
- FTP_TRANSFER_MODE enumerates possible file transfer modes
- */
-
- typedef enum
- {
- FTP_STREAM,
- FTP_BLOCK,
- FTP_COMPRESSED
- } FTP_TRANSFER_MODE;
-
- /*
- FTP_COMMAND enumerates the different FTP commands sent to host
- */
-
- typedef enum {
- FTP_CLOSED=0, /* control connection closed */
- FTP_CLEAR=1, /* no outstanding request or user used backdoor */
- FTP_USER=2, /* username sent */
- FTP_PASS=3, /* password sent */
- FTP_ACCT=4, /* acct sent */
- FTP_CWD=5, /* changing working directory */
- FTP_CDUP=6, /* changing working directory up one level */
- FTP_SMNT=7, /* do a structured mount */
- FTP_QUIT=8, /* quit and release all resources or connection closed */
- FTP_REIN=9, /* reinitialize */
- FTP_PORT=10, /* set data port */
- FTP_PASV=11, /* instruct server to go passive */
- FTP_TYPE=12, /* change type file */
- FTP_STRU=13, /* specify file structure */
- FTP_MODE=14, /* specify data transfer mode */
- FTP_RETR=15, /* receiving a file */
- FTP_STOR=16, /* sending a file with create option */
- FTP_STOU=17, /* sending a file with create unique option */
- FTP_APPE=18, /* sending a file with append (create) option */
- FTP_ALLO=19, /* allocate storage on host */
- FTP_REST=20, /* restart file transfer */
- FTP_RNFR=21, /* rename from */
- FTP_RNTO=22, /* rename to */
- FTP_ABOR=23, /* abort control connection */
- FTP_DELE=24, /* deleting a file */
- FTP_RMD=25, /* remove dir */
- FTP_MKD=26, /* make a directory */
- FTP_PWD=27, /* print working directory */
- FTP_LIST=28, /* waiting for a directory listing */
- FTP_NLST=29, /* waiting for a name listing */
- FTP_SITE=30, /* special site instructions */
- FTP_SYST=31, /* get type of operating system */
- FTP_STAT=32, /* get status info */
- FTP_HELP=33, /* help request */
- FTP_NOOP=34, /* noop request */
-
- FTP_END
- } FTP_COMMAND;
-
- /*
- FTP_STATUS enumerates the status of FTP replies from host
- */
-
- typedef enum {
- FTP_UNKNOWN=0, /* spontaneous data or reply from "backdoor" */
- FTP_SUCCESS=1, /* operation completed sucessfully */
- FTP_ERROR=2, /* unexpected error */
- FTP_FAILURE=3, /* failure to complete successfully */
- FTP_WORKING=4 /* informative...wait for next */
- } FTP_STATUS;
-
- /*
- PowerTCP typedefs...
- */
-
- DECLARE_HANDLE (HPOWERTCP); /* handle */
-
- typedef void (CALLBACK * ACCEPTEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData /* UserData from Listen() function */
- );
- typedef void (CALLBACK * CMDEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- BYTE Cmd, /* TELNET command (WILL, WONT, DO, DONT...) */
- BYTE Option, /* TELNET option number */
- LPBYTE SubOption, /* pointer to sub-option string */
- size_t ByteCnt /* byte count for SubOption */
- );
- typedef void (CALLBACK * CONNECTEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- LPCSTR RemoteDotAddr, /* remote host connected to in dot notation */
- WORD RemotePort,/* remote port connected to */
- LPCSTR LocalDotAddr, /* local host address in dot notation */
- WORD LocalPort, /* local port */
- LPCSTR LocalName /* name of default local host */
- );
- typedef void (CALLBACK * CONNECTUDPEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- LPCSTR LocalDotAddr, /* local host address in dot notation */
- WORD LocalPort, /* local port */
- LPCSTR LocalName, /* name of default local host */
- WORD MaxByteCnt /* largest datagram size supported */
- );
- typedef void (CALLBACK * EXCEPTIONEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- PT_EXCEPTION ErrorCode, /* spontaneous exception notification */
- LPCSTR ErrorDesc /* description of error */
- );
- typedef void (CALLBACK * EXCEPTIONUDPEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- PT_EXCEPTION ErrorCode, /* spontaneous exception notification */
- LPCSTR ErrorDesc, /* description of error */
- DWORD DataTag /* identification of datagram where failure occurred */
- );
- typedef void (CALLBACK * LISTENEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- LPCSTR LocalDotAddr, /* local host address in dot notation */
- WORD LocalPort, /* local port */
- LPCSTR LocalName /* name of default local host */
- );
- typedef void (CALLBACK * LOGEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- LPCSTR Message /* Message log */
- );
- typedef void (CALLBACK * RECVEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- LPVOID Data, /* data from remote source */
- size_t ByteCnt /* byte count for Data */
- );
- typedef void (CALLBACK * RECVUDPEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- LPVOID Data, /* data from remote source */
- size_t ByteCnt, /* byte count for RecvData */
- LPCSTR RemoteDotAddr, /* source address of datagram */
- WORD RemotePort /* source port of datagram */
- );
- typedef void (CALLBACK * REPLYEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- FTP_STATUS Status, /* FTP completion status */
- FTP_COMMAND LastCommand, /* last command sent */
- int ReplyCode, /* 3-digit FTP reply code */
- LPCSTR ReplyStr /* Reply string */
- );
- typedef void (CALLBACK * SENDEVENT)(
- HPOWERTCP hSession, /* identifies session notifying our app */
- DWORD UserData, /* UserData from Connect() function */
- DWORD DataTag /* DataTag from Send() functions */
- );
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /*
- PowerTCP DLL functions follow...
- */
-
- /* TCP functions for PxxTCPC2.DLL */
- /* ConnectTelnet() generates an ConnectEvent() notification if successful */
- HPOWERTCP CALLBACK ConnectTcp (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- LPCSTR RemoteHost, /* use name or dot notation */
- WORD RemotePort, /* port to connect to (usually 23 for TELNET) */
- LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */
- WORD LocalPort, /* normally 0 for "don't care", but can be specified */
- CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */
- RECVEVENT RecvEvent, /* your event handler for receiving data */
- SENDEVENT SendEvent, /* your event handler for Send confirmation */
- EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
- );
- /* ListenTcp() always generates an ListenEvent() notification */
- HPOWERTCP CALLBACK ListenTcp (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */
- WORD LocalPort, /* port for accepting connections (usually 23 for TELNET) */
- LISTENEVENT ListenEvent, /* your event handler for session Open/Close notification */
- RECVEVENT RecvEvent, /* new for v. 1.1...notifies you of closed listener */
- ACCEPTEVENT AcceptEvent, /* your event handler for accepting a connection */
- EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
- );
- /* AcceptTcp() always generates a ConnectEvent() notification */
- HPOWERTCP CALLBACK AcceptTcp (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- HPOWERTCP hListener, /* hPowerTcp that generated AcceptEvent() */
- CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */
- RECVEVENT RecvEvent, /* your event handler for receiving data */
- SENDEVENT SendEvent, /* your event handler for Send confirmation */
- EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
- );
- /* SendTcp() always generates a SendEvent() notification */
- BOOL CALLBACK SendTcp (
- HPOWERTCP hSession, /* identifies session for sending data */
- LPVOID Data, /* pointer to data for sending */
- size_t ByteCnt, /* data count to send */
- BOOL Urgent, /* urgent flag for out-of-band data (usually not used) */
- DWORD DataTag /* id tag for data sent */
- );
- /* CloseTcp() always generates a RecvEvent() notification with NULL parameters */
- BOOL CALLBACK CloseTcp (
- HPOWERTCP hSession, /* identifies session */
- BOOL Abort /* if TRUE, outstanding buffers are lost */
- /* if FALSE, gracefull close is attempted */
- );
- /* StateTcp() just returns PT_STATE */
- PT_STATE CALLBACK StateTcp (
- HPOWERTCP hSession /* identifies session */
- );
- /* RecvTcp() will generate at least one RecvEvent() if data is in the network buffers */
- BOOL CALLBACK RecvTcp (
- HPOWERTCP hSession, /* identifies session */
- size_t MaxRecvCnt /* maximum ByteCnt for any RecvEvent() */
- );
-
- /* TELNET functions for PxxTNTC2.DLL */
- /* ConnectTelnet() generates an ConnectEvent() notification if successful */
- HPOWERTCP CALLBACK ConnectTelnet (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- LPCSTR RemoteHost, /* use name or dot notation */
- WORD RemotePort, /* port to connect to (usually 23 for TELNET) */
- LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */
- WORD LocalPort, /* normally 0 for "don't care", but can be specified */
- CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */
- RECVEVENT RecvEvent, /* your event handler for receiving data */
- SENDEVENT SendEvent, /* your event handler for Send confirmation */
- CMDEVENT CmdEvent, /* your event handler for received TELNET commands */
- EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
- );
- /* ListenTelnet() always generates an ListenEvent() notification */
- HPOWERTCP CALLBACK ListenTelnet (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */
- WORD LocalPort, /* port for accepting connections (usually 23 for TELNET) */
- LISTENEVENT ListenEvent, /* your event handler for session Open/Close notification */
- RECVEVENT RecvEvent, /* new for v. 1.1...notifies you of closed listener */
- ACCEPTEVENT AcceptEvent, /* your event handler for accepting a connection */
- EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
- );
- /* AcceptTelnet() generates a ConnectEvent() notification if successful */
- HPOWERTCP CALLBACK AcceptTelnet (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- HPOWERTCP hListener, /* hPowerTcp that generated AcceptEvent() */
- CONNECTEVENT ConnectEvent, /* your event handler for session Open/Close notification */
- RECVEVENT RecvEvent, /* your event handler for receiving data */
- SENDEVENT SendEvent, /* your event handler for Send confirmation */
- CMDEVENT CmdEvent, /* your event handler for received TELNET commands */
- EXCEPTIONEVENT ExceptionEvent /* your event handler for exception notifications */
- );
- /* SendTelnet() always generates a SendEvent() notification */
- BOOL CALLBACK SendTelnet (
- HPOWERTCP hSession, /* identifies session for sending data */
- LPVOID Data, /* pointer to data for sending */
- size_t ByteCnt, /* data count to send */
- BOOL Urgent, /* urgent flag for out-of-band data (usually not used) */
- DWORD DataTag /* instance identification of data sent */
- );
- /* SendTelnetCmd() always generates a SendEvent() notification */
- BOOL CALLBACK SendTelnetCmd (
- HPOWERTCP hSession, /* identifies session */
- BYTE Cmd, /* TELNET command (WILL, WONT, DO, DONT...) */
- BYTE Option, /* TELNET option number */
- LPBYTE SubOption, /* pointer to sub-option string */
- size_t ByteCnt, /* byte count for SubOption */
- DWORD DataTag /* instance identification of data sent */
- );
- /* CloseTelnet() always generates an ExceptionEvent() notification */
- BOOL CALLBACK CloseTelnet (
- HPOWERTCP hSession, /* identifies session */
- BOOL Abort /* if TRUE, outstanding buffers are lost */
- /* if FALSE, gracefull close is attempted */
- );
- /* StateTelnet() just returns PT_STATE */
- PT_STATE CALLBACK StateTelnet (
- HPOWERTCP hSession /* identifies session */
- );
- /* RecvTelnet() will generate at least one RecvEvent() if data is in the network buffers */
- BOOL CALLBACK RecvTelnet (
- HPOWERTCP hSession, /* identifies session */
- size_t MaxRecvCnt /* maximum ByteCnt for any RecvEvent() */
- );
-
- /* TELNET command definitions */
- #define SE_CMD 240
- #define NOP_CMD 241
- #define DATA_MARK_CMD 242
- #define BREAK_CMD 243
- #define INTERRUPT_PROCESS_CMD 244
- #define ABORT_OUTPUT_CMD 245
- #define ARE_YOU_THERE_CMD 246
- #define ERASE_CHARACTER_CMD 247
- #define ERASE_LINE_CMD 248
- #define GO_AHEAD_CMD 249
- #define WILL_CMD 251
- #define WONT_CMD 252
- #define DO_CMD 253
- #define DONT_CMD 254
- #define SB_CMD 250 /* suboption negotiation */
- #define IAC_CMD 255 /* decimal 255 */
- #define SE_CMD 240 /* decimal 240, suboption negotiation */
-
- /* TELNET options */
- #define TERMTYPE_OPTION 24
-
- /* FTP functions for PxxFTPC1.DLL */
-
- /* AbortFtp() */
- BOOL CALLBACK AbortFtp(HPOWERTCP hSession);
-
- /* AllocateFtp() */
- BOOL CALLBACK AllocateFtp(HPOWERTCP hSession,LONG MaxFileSize,
- LONG MaxRecordSize);
-
- /* AppeFtp() */
- BOOL CALLBACK AppeFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* ChDirFtp() */
- BOOL CALLBACK ChDirFtp(HPOWERTCP hSession,LPSTR NewDir);
-
- /* ChDirUpFtp() */
- BOOL CALLBACK ChDirUpFtp(HPOWERTCP hSession);
-
- /* CloseFtp() */
- BOOL CALLBACK CloseFtp(HPOWERTCP hSession);
-
- /* CloseDataFtp() */
- BOOL CALLBACK CloseDataFtp(HPOWERTCP hSession);
-
- /* CommandFtp() */
- BOOL CALLBACK CommandFtp(HPOWERTCP hSession,LPSTR CommandStr);
-
- /* DeleteFtp() */
- BOOL CALLBACK DeleteFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* FileStructFtp() */
- BOOL CALLBACK FileStructFtp(HPOWERTCP hSession,FTP_FILE_STRUCT Structure);
-
- /* HelpFtp() */
- BOOL CALLBACK HelpFtp(HPOWERTCP hSession,LPSTR Command);
-
- /* LastCommandFtp() */
- FTP_COMMAND CALLBACK LastCommandFtp(HPOWERTCP hSession);
-
- /* ListFtp() */
- BOOL CALLBACK ListFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* LoginFtp */
- HPOWERTCP CALLBACK LoginHostFtp(DWORD UserData,
- LPCSTR LicenseKey,
- PT_FLAGS Flags,
- LPCSTR RemoteHost,
- LPCSTR LocalDotAddr,
- LPCSTR User,
- LPCSTR Password,
- LPCSTR Account,
- CONNECTEVENT ConnectEvent,
- LOGEVENT LogEvent,
- RECVEVENT RecvEvent,
- REPLYEVENT ReplyEvent,
- SENDEVENT SendEvent);
-
- /* LogoutFtp() */
- BOOL CALLBACK LogoutFtp(HPOWERTCP hSession);
-
- /* MakeDirFtp() */
- BOOL CALLBACK MakeDirFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* ModeFtp() */
- BOOL CALLBACK ModeFtp(HPOWERTCP hSession,FTP_TRANSFER_MODE TransferMode);
-
- /* NameListFtp() */
- BOOL CALLBACK NameListFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* NoopFtp() */
- BOOL CALLBACK NoopFtp(HPOWERTCP hSession);
-
- /* PassiveFtp() */
- BOOL CALLBACK PassiveFtp(HPOWERTCP hSession);
-
- /* PortFtp() */
- BOOL CALLBACK PortFtp(HPOWERTCP hSession,LPSTR HostPort);
-
- /* PrintWorkingDirFtp() */
- BOOL CALLBACK PrintWorkingDirFtp(HPOWERTCP hSession);
-
- /* ReinitializeFtp() */
- BOOL CALLBACK ReinitializeFtp(HPOWERTCP hSession);
-
- /* RemoveDirFtp() */
- BOOL CALLBACK RemoveDirFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* RenameFtp() */
- BOOL CALLBACK RenameFtp(HPOWERTCP hSession,LPSTR FromPathName,
- LPSTR ToPathName);
-
- /* RestartFtp() */
- BOOL CALLBACK RestartFtp(HPOWERTCP hSession,LPSTR Marker);
-
- /* RetrieveFtp() */
- BOOL CALLBACK RetrieveFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* SendFtp() */
- BOOL CALLBACK SendFtp(HPOWERTCP hSession,LPVOID Data, size_t Cnt);
-
- /* SiteFtp() */
- BOOL CALLBACK SiteFtp(HPOWERTCP hSession,LPSTR Desc);
-
- /* StatusFtp() */
- BOOL CALLBACK StatusFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* StoreFtp() */
- BOOL CALLBACK StoreFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* StoreUniqueFtp() */
- BOOL CALLBACK StoreUniqueFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* StructMountFtp() */
- BOOL CALLBACK StructMountFtp(HPOWERTCP hSession,LPSTR PathName);
-
- /* SystemFtp() */
- BOOL CALLBACK SystemFtp(HPOWERTCP hSession);
-
- /* TypeFtp() */
- BOOL CALLBACK TypeFtp(HPOWERTCP hSession,LPSTR RepType);
-
- /* UDP functions for PxxUDPC1.DLL */
- /* ConnectUdp() generates an ConnectUdpEvent() notification if successful */
- HPOWERTCP CALLBACK ConnectUdp (
- DWORD UserData, /* user-defined data passed back by all callback functions */
- LPCSTR OemLicense, /* use license number assigned to you by Dart */
- PT_FLAGS Flags, /* specify desired flags */
- LPCSTR LocalDotAddr, /* NULL or local dot address for multi-homed host */
- WORD LocalPort, /* normally 0 for "don't care", but can be specified */
- CONNECTUDPEVENT ConnectUdpEvent, /* your event handler for session Open/Close notification */
- RECVUDPEVENT RecvUdpEvent, /* your event handler for receiving data */
- SENDEVENT SendEvent, /* your event handler for Send confirmation */
- EXCEPTIONUDPEVENT ExceptionUdpEvent /* your event handler for exception notifications */
- );
- /* SendUdp() always generates a SendUdpEvent() notification */
- BOOL CALLBACK SendUdp (
- HPOWERTCP hSession, /* identifies session for sending data */
- LPCSTR RemoteHost, /* use name or dot notation */
- WORD RemotePort, /* port to connect to (usually 23 for TELNET) */
- LPVOID Data, /* pointer to data for sending */
- size_t ByteCnt, /* data count to send */
- DWORD DataTag /* id tag for data sent */
- );
- /* CloseUdp() always generates a RecvUdpEvent() notification with NULL parameters */
- BOOL CALLBACK CloseUdp (
- HPOWERTCP hSession, /* identifies session */
- BOOL Abort /* if TRUE, outstanding buffers are lost */
- /* if FALSE, gracefull close is attempted */
- );
- /* StateUdp() just returns PT_STATE */
- PT_STATE CALLBACK StateUdp (
- HPOWERTCP hSession /* identifies session */
- );
- /* RecvUdp() will generate at least one RecvUdpEvent() if data is in the network buffers */
- BOOL CALLBACK RecvUdp (
- HPOWERTCP hSession /* identifies session */
- );
-
-
- #ifdef __cplusplus
- }
- #endif
-
-